let GameDataManager = {
    setting:{
        debug: false,
        multi: 10,
    },

    carData: [
        {
            id: 0,
            price: 0,
            value: 1
        },
        {
            id: 1,
            price: 0,
            value: 1,
        },
        {
            id: 2,
            price: 0,
            value: 1
        },
        {
            id: 3,
            price: 0,
            value: 1
        },
        {
            id: 4,
            price: 0,
            value: 1
        },
        {
            id: 5,
            price: 10,
            value: 2
        },
        {
            id: 6,
            price: 20,
            value: 3
        },
        {
            id: 7,
            price: 40,
            value: 6,
        },
        {
            id: 8,
            price: 80,
            value: 10
        },
        {
            id: 9,
            price: 130,
            value: 15
        },
        {
            id: 10,
            price: 180,
            value: 20
        },
        {
            id: 11,
            price: 240,
            value: 25
        },
        {
            id: 12,
            price: 300,
            value: 30
        },
        {
            id: 13,
            price: 370,
            value: 35
        },
        {
            id: 14,
            price: 450,
            value: 45
        },
        {
            id: 15,
            price: 540,
            value: 55
        },
        {
            id: 16,
            price: 640,
            value: 65
        },
        {
            id: 17,
            price: 750,
            value: 75
        },
        {
            id: 18,
            price: 860,
            value: 85
        },
        {
            id: 19,
            price: 980,
            value: 100,
        },
        {
            id: 20,
            price: 1100,
            value: 110
        },
        {
            id: 21,
            price: 1250,
            value: 125
        },
        {
            id: 22,
            price: 1400,
            value: 140
        },
        {
            id: 23,
            price: 1800,
            value: 180
        },
        {
            id: 24,
            price: 2000,
            value: 200,
        },
        {
            id: 25,
            price: 2200,
            value: 220
        },
        {
            id: 26,
            price: 2400,
            value: 240
        },
        {
            id: 27,
            price: 2600,
            value: 260,
        },
        {
            id: 28,
            price: 2800,
            value: 280
        },
        {
            id: 29,
            price: 3000,
            value: 300
        },
        {
            id: 30,
            price: 3200,
            value: 320
        },
        {
            id: 31,
            price: 3400,
            value: 340
        },
        {
            id: 32,
            price: 3600,
            value: 360,
        },
        {
            id: 33,
            price: 3800,
            value: 380
        },
        {
            id: 34,
            price: 4000,
            value: 400
        },
        {
            id: 35,
            price: 4200,
            value: 420,
        },
        {
            id: 36,
            price: 4400,
            value: 440
        },
        {
            id: 37,
            price: 4600,
            value: 460
        },
        {
            id: 38,
            price: 4800,
            value: 480
        },
        {
            id: 39,
            price: 5000,
            value: 500,
        },
        {
            id: 40,
            price: 5200,
            value: 520
        },
        {
            id: 41,
            price: 5400,
            value: 540,
        },
        {
            id: 42,
            price: 5600,
            value: 560
        },
        {
            id: 43,
            price: 5800,
            value: 580
        },
    ],

    chapterPassExps: [
        15,
        15,
        20,
        20,
        25,
        30,
        30,
        35,
        40,
        45,
        50,
        60,
        65,
        70,
        80,
        90,
        100,
        110,
        120,
        130,
        140,
        150,
        160,
        175,
        190,
        205,
        220,
        240,
        260,
        280,
        300,
        320,
        340,
        370,
        400,
        430,
        460,
        490,
        520,
        550,
        580,
        610,
        640,
        670,
        700,
        730,
        760,
        790,
        820,
        850,
        880,
        910,
        940,
        970,
        1000,
        1030,
        1060,
        1090,
        1120,
        1150,
        1180,
        1210,
        1240,
        1270,
        1300,
        1330,
        1360,
        1390,
        1440,
        1490,
        1540,
        1590,
        1640,
        1690,
        1740,
        1790,
        1840,
        1890,
        1940,
        1990,
        2040,
        2090,
        2140,
        2190,
        2240,
        2290,
        2340,
        2390,
        2440,
        2490
    ],

    getCarValue(index) {
        return this.carData[index].value;
    },

    getCarPrice(index) {
        return this.carData[index].price;
    },

    getChapterPassExp(chapterLevel) {
        console.log("GameDataManager-getChapterPassExp");
        let list = this.chapterPassExps;
        let num;
        if (chapterLevel > list.length - 1) {
            num = list[list.length - 1] + (chapterLevel - 90) * 70;
            if (num > 11240) num = 11240;
        } else {
            num = list[chapterLevel];
        }
        return num;
    }
};


module.exports = GameDataManager;